<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="news.dao.impl.*" %>
<%@ page import="org.news.dao.*" %>
<%@ page import="news.entity.*" %>
<div class="sidebar">
    <h1> <img src="images/title_1.gif" alt="国内新闻" /> </h1>
    <div class="side_list">
       <%
    NewsDaoImpl td1=new NewsDaoImpl();
    List<News> list1=td1.getNewsByNtid(1);
    
    %>
      <ul>
      <% 	
   for(News n1:list1){
    	out.print("<li><a href='showNews.jsp?opr=readNew&nid="+n1.getNid()+"'>"+n1.getNtitle()+" </a></li>"); 	
    }
    %>
      </ul>
    </div>
    <h1> <img src="images/title_2.gif" alt="国际新闻" /> </h1>
    <div class="side_list">
     <%
    NewsDaoImpl td2=new NewsDaoImpl();
    List<News> list2=td2.getNewsByNtid(2);
    
    %>
      <ul>
      <% 	
    for(News n2:list2){
    	out.print("<li><a href='showNews.jsp?opr=readNew&nid="+n2.getNid()+"'>"+n2.getNtitle()+" </a></li>"); 	
    }
    %>
      </ul>
    </div>
    
    <h1> <img src="images/title_3.gif" alt="娱乐新闻" /> </h1>
    <div class="side_list">
    <%
    NewsDaoImpl td5=new NewsDaoImpl();
    List<News> list5=td5.getNewsByNtid(5);
    
    %>
      <ul>
      <% 	
   for(News n5:list5){
    	out.print("<li><a href='showNews.jsp?opr=readNew&nid="+n5.getNid()+"'>"+n5.getNtitle()+" </a></li>"); 	
    }
    %>	
      </ul>
    </div>
  </div>